package com.dobbinsoft.iotechn.data.logger;

import com.dobbinsoft.iotechn.core.model.TraceDTO;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description: 静态代理Log4j实现日志。无法实现分布式日志和轨迹日志。为以后方便热插拔设计
 * User: rize
 * Date: 2020/3/20
 * Time: 15:52
 */
public class Log4jProxyImpl implements Logger {

    private org.slf4j.Logger logger;

    public void setLogger(org.slf4j.Logger logger) {
        this.logger = logger;
    }

    @Override
    public void debug(String log) {
        logger.debug(log);
    }

    @Override
    public void info(String log) {
        logger.info(log);
    }

    @Override
    public void warn(String log) {
        logger.warn(log);
    }

    @Override
    public void error(String log) {
        logger.error(log);
    }

    @Override
    public void error(String log, Throwable t) {
        logger.error(log, t);
    }

    @Override
    public void infoAggregation(String log) {
        logger.info(log);
    }

    @Override
    public void errorAggregation(String log) {
        logger.error(log);
    }

    @Override
    public void errorAggregation(String log, Throwable t) {
        logger.error(log, t);
    }

}
